<?php

namespace app\common\library;

use app\Request;

class Auth
{
    private static ?object $instance = null;

    private function __construct()
    {
    }

    private function __clone()
    {
    }

    /**
     * @return Auth
     */
    public static function instance(): Auth
    {
        if (!self::$instance instanceof self) {
            self::$instance = new self();
        }
        return self::$instance;
    }

    /**
     * pathInfo
     * @param Request $request
     * @return string
     */
    public function getPathInfo(Request $request): string
    {
        return $request->pathinfo();
    }
}